package com.cskaoyan.bean;

import lombok.Data;

import java.util.List;

@Data
public class Chlidren {

    @Data
    public static class DataBean {
        private List<SystemPermissionsBean> systemPermissions;
        private List<?> assignedPermissions;
        @Data
        public static class SystemPermissionsBean {
            /**
             * id : 系统管理
             * label : 系统管理
             * children : [{"id":"管理员管理","label":"管理员管理","children":[{"id":"admin:admin:update","label":"编辑","api":"POST /admin/admin/update"},{"id":"admin:admin:list","label":"查询","api":"GET /admin/admin/list"},{"id":"admin:admin:read","label":"详情","api":"GET /admin/admin/read"},{"id":"admin:admin:delete","label":"删除","api":"POST /admin/admin/delete"},{"id":"admin:admin:create","label":"添加","api":"POST /admin/admin/create"}]},{"id":"角色管理","label":"角色管理","children":[{"id":"admin:role:permission:update","label":"权限变更","api":"POST /admin/role/permissions"},{"id":"admin:role:update","label":"角色编辑","api":"POST /admin/role/update"},{"id":"admin:role:list","label":"角色查询","api":"GET /admin/role/list"},{"id":"admin:role:read","label":"角色详情","api":"GET /admin/role/read"},{"id":"admin:role:delete","label":"角色删除","api":"POST /admin/role/delete"},{"id":"admin:role:permission:get","label":"权限详情","api":"GET /admin/role/permissions"},{"id":"admin:role:create","label":"角色添加","api":"POST /admin/role/create"}]},{"id":"对象存储","label":"对象存储","children":[{"id":"admin:storage:update","label":"编辑","api":"POST /admin/storage/update"},{"id":"admin:storage:list","label":"查询","api":"GET /admin/storage/list"},{"id":"admin:storage:read","label":"详情","api":"POST /admin/storage/read"},{"id":"admin:storage:delete","label":"删除","api":"POST /admin/storage/delete"},{"id":"admin:storage:create","label":"上传","api":"POST /admin/storage/create"}]},{"id":"操作日志","label":"操作日志","children":[{"id":"admin:log:list","label":"查询","api":"GET /admin/log/list"}]}]
             */
            private String id;
            private String label;
            private List<ChildrenBeanX> children;

            @Data
            public static class ChildrenBeanX {
                /**
                 * id : 管理员管理
                 * label : 管理员管理
                 * children : [{"id":"admin:admin:update","label":"编辑","api":"POST /admin/admin/update"},{"id":"admin:admin:list","label":"查询","api":"GET /admin/admin/list"},{"id":"admin:admin:read","label":"详情","api":"GET /admin/admin/read"},{"id":"admin:admin:delete","label":"删除","api":"POST /admin/admin/delete"},{"id":"admin:admin:create","label":"添加","api":"POST /admin/admin/create"}]
                 */
                private String id;
                private String label;
                private List<ChildrenBean> children;

                @Data
                public static class ChildrenBean {
                    /**
                     * id : admin:admin:update
                     * label : 编辑
                     * api : POST /admin/admin/update
                     */
                    private String id;
                    private String label;
                    private String api;

                }
            }
        }
    }
}
